package com.zhisuo.apicenter.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class ZhiSuoUserIntegralRecordRowMapper implements RowMapper<ZhiSuoUserIntegralRecord> {

    @Override
    public ZhiSuoUserIntegralRecord mapRow(ResultSet rs, int rowNum) throws SQLException {
        ZhiSuoUserIntegralRecord r = new ZhiSuoUserIntegralRecord();
        r.setId(rs.getInt("id"));
        r.setOrderid(rs.getInt("orderid"));
        r.setIntegralnum(rs.getInt("integralnum"));
        r.setAfterintegralnum(rs.getInt("afterintegralnum"));
        r.setCreatetime(rs.getTimestamp("createtime"));
        r.setUserid(rs.getInt("userid"));
        r.setType(rs.getInt("type"));
        r.setStatus(rs.getInt("status"));
        r.setContent(rs.getString("content"));
        r.setSourcetype(rs.getInt("sourcetype"));
        return r;
    }

}
